const apiUrl = 'https://h5.watsons.com.cn';
//数据获取的封装
const pageData = {
  list(callback){
    wx.request({
      url: `${apiUrl}/aladdin/get_batch_data?codes=[%22new_Home_topBig_forcase_180105_1%22,   %22new_Home_4navs_180105_1%22,%22new_Home_coupon_180105_4%22,%22Home_pingo_170505_5%22,%22Home_AboveTopic_activity_170505_7%22,%22Home_TopicCase_170505_7%22,%22Home_CategaryNavs_170505_7%22]&version=&app_channel=wap&plat=wap&access_token=&device_id=6700d760-c146-11e8-aa3d-6743e5bb8062`, //仅为示例，并非真实的接口地址

      header: {
        'content-type': 'application/json' // 默认值
      },
      success(res) {
        // console.log(res.data);
        callback('success',res);
      },
    })
  },

  shishang(callback) {//获取时尚数据
    wx.request({
      url: `${apiUrl}/item/ws/group_list?current_page=1&page_size=24&group_id=10022&device_id=0914a8d0-c1f4-11e8-879f-118ab1f1985a`,
      //仅为示例，并非真实的接口地址

      header: {
        'content-type': 'application/json' // 默认值
      },
      success: function (res) {
        // console.log(res.data);
        callback('success', res);
      }
    })
  },

  //获取跳转内容页的内容
  neirong(callback) {//获取时尚数据
    wx.request({
      url: `${apiUrl}/item/ws/group_list?current_page=1&page_size=24&group_id=9728&device_id=4dd72840-c1f3-11e8-8956-836467daebae`,
      //仅为示例，并非真实的接口地址

      header: {
        'content-type': 'application/json' // 默认值
      },
      success: function (res) {
        // console.log(res.data);
        callback('success', res);
      }
    })
  },
  //会员中心获取数据
  huiy(callback) {//获取时尚数据
    wx.request({
      url: `${apiUrl}/item/ws/group_list?current_page=1&page_size=24&group_id=9966&device_id=dd3a79b0-c2bb-11e8-b8d5-3786a0007f2c`,
      //仅为示例，并非真实的接口地址

      header: {
        'content-type': 'application/json' // 默认值
      },
      success: function (res) {
        console.log(res.data);
        callback('success', res);
      }
    })
  },
}
//输出
module.exports = {
  pageData
}